﻿using System;
using Excel4SmallBasic;
using Microsoft.SmallBasic.Library;
using Microsoft.VisualStudio.TestTools.UnitTesting;

namespace Excel4SmallBasic.Test
{
    [TestClass()]
    public class ExcelTest
    {
        public TestContext TestContext { get; set; }

        [TestMethod()]
        public void ColIndexToIntTest()
        {
            Excel_Accessor.ColIndexToInt(new Primitive(1)).Is(1);
            Excel_Accessor.ColIndexToInt(new Primitive(234)).Is(234);

            Excel_Accessor.ColIndexToInt(new Primitive("A")).Is(1);
            Excel_Accessor.ColIndexToInt(new Primitive("C")).Is(3);
            Excel_Accessor.ColIndexToInt(new Primitive("AA")).Is(27);
            Excel_Accessor.ColIndexToInt(new Primitive("BD")).Is(56);
        }
    }
}
